from typing import List

def moveZeroes(nums: List[int]) -> None:
    """
    Do not return anything, modify nums in-place instead.
    """
    
    # 双指针1
    n = len(nums)
    i,j = 0, 0 
    
    while j<n:
        if nums[j] != 0 and nums[i] == 0:
            nums[i], nums[j] = nums[j],nums[i]
        if nums[i] != 0:
            i += 1
        j += 1
    
    # 双指针2：
    n = len(nums)
        j = 0 
        if not nums:
            return 0
        

        for i in range(n):
                if nums[i]:
                    nums[j] = nums[i]
                    j += 1
            
        for k in range(j,n):
            nums[k]=0

    # sort利用key=bool
    nums.sort(key= bool, reverse = True)